<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>
<script>
    $(document).ready(function () {
        //获取url中的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]);
            return null; //返回参数值
        }


        var url = "https://vip.xfyun.one/home/api?type=xfyuna&uid=4721585&key=chjoqstuvEJLOWX289&url="+getUrlParam("url");
        // +getUrlParam("url");

        $.ajax({url: "http://101.34.228.16:8081/forward/getContext?url=" + escape(url) + "&ua=null"}).then(res => {
            document.write("<video>" +
                "<source src=" + JSON.parse(res).url + " style='width:100%'> </source>" +
                "</video>")
        },)


    });

</script>
</body>
</html>